const checkService = require('../service/checkService')

class CheckController {
  async getChecksList(ctx, next) {
    const { sportName,pagenum,pagesize } = ctx.request.body 
    const res = await checkService.getChecksBySportId(sportName, pagenum, pagesize)
    ctx.body = {
      data: {
        ...res,
        pagenum
      }
    }
  }
  async checkItem(ctx, next) {
    const { id } = ctx.params 
    await checkService.checkItem(id)
    ctx.body = {
      msg:"success"
    }
  }
}

module.exports = new CheckController()